package com.glc.hms.system.model.wrapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glc.hms.common.controller.BaseWrap;
import com.glc.hms.common.tree.MenuTreeInfo;
import com.glc.hms.core.common.ConstantFactory;

import java.util.List;
import java.util.Map;

/**
 * @author Santa
 * @since 2019/11/29
 */
public class RoleWrapper extends BaseWrap {
    public RoleWrapper(Map<String, Object> single) {
        super(single);
    }

    public RoleWrapper(List<Map<String, Object>> multi) {
        super(multi);
    }

    public RoleWrapper(Page<Map<String, Object>> page) {
        super(page);
    }

    @Override
    protected void wrapTheMap(Map<String, Object> map) {
        List<MenuTreeInfo> menuList = ConstantFactory.me().getMenuListByRoleId((Long) map.get("roleId"));
        map.put("menuList",menuList);
    }
}























